mci_quadrocopterws_2014_automation_projectfandomcom-20200213-history
MCI Quadrocopter(WS 2014 Automation Project) Wiki
Welcome to the MCI Quadrocopter(WS 2014 Automation Project) Wiki This wiki deals with commissioning and starting up a quadcopter using the microcontroller XMC 4500. It describes the basic steps like assembling, programming and testing. Introduction One new field in automation and aviation is the field of quadcopters. In this field the whole background of automation and flight dynamics are combined. There is done a lot of research right now, because companies like Amazon try to deliver their cargo with these flying vehicles. In the first term of our Masters program we had to configure a quadcopter, which is controlled with a remote control, with just mechanical setup we got from the company INFINION. The general idea was to implement the whole measurement, control and software part of a quadcopter. We were split up in teams of eight people. The general idea of this project was to train our skills in the electrical, the software and the team ability parts of our study program. Through the different stages of our project, we got an insight in different types of IMU’s, working with brushless motors and the mechanics behind a quadcopter. To attract the whole attention of us to this project, the instruction team invented a big event at the end of this course. In total there were four teams with four different quadcopters. In this event they are attending a flight course similar to the Red Bull Air Race, and the winner will receive a price. With this method, the instruction team really got all our passion. Task In this chapter the task is described in several steps to cover all necessary steps which are desired from the problem to the fragmentation of the task into different parts. Problem and System description The main Problem of this project was to build up a whole quadcopter system, which include the hardware implementation and the design of the controller. Therefore a lot of work was done in preparation concerning the kinematic model which we got in a reader from similar projects. First of all we discussed in a meeting what are the aims and how we can achieve it. We also talked about the realization of the project. We got an idea how does it work and build on that, this is explained in chapter 2.4. After this meeting the mechatronic department provided us with all the necessary stuff which is Software and Hardware. For this intent we require a quadcopterbaseframe. This baseframe was ordered as a kit which include following parts: * 1x Base frame * 4x Brushless DC-drives * 4x propellers * 4x Motor controllers Tasks Tools / Software Fragmatation into different parts Kinematic model Theory behind the Flight model Inertial frame and configuration Production of the equations for the model Experimental measurement of thrust To get the quadrocopter to fly we need the thrust force of the rotors which is calculated by the following formula The density of the air , the radius of the propeller and the resulting area are known constants. The unknown constant called thrust coefficient is defined as the thrust force of an engine unit of frontal area per unit of incompressible dynamic pressure. This constant has to be calculated by experiment. If we apply a certain rotational speed to the propeller the force could be measured. Hence it is possible to calculate the missing constant .To measure the thrust of the motor we first need a test rig. The measurement structure is described in the following pictures. The quadcopter was fixed on a piece of timber that it can’t fly away and damage the environment. On the left side the rotor is applied to the motor. This is our testing motor. On the right hand side the quadcopter is placed on a scale for the thrust measurement. When the propeller is turning on the one side it pushes down the other side with the equal force, which can be calculated from the weight value of the scale. We applied the appropriate voltage and a certain duty cycle to the motor. The duty cycle was created via Labview. This duty cycle is scaled from 5 to 10 percent, which is usual for this type of motor. 5 percent duty cycle means no speed and 10 percent duty cycle means maximal rotational speed. So we increased the duty cycle from 5% to 10% in 0.5% steps. The result of the measurement was the rotational speed with the corresponding thrust force, which we need to calculate the thrust coefficient. Measured data: Table 1 shows the starting conditions. We applied a certain Duty cycle with a certain time to the motor and measured the current and the voltage, which is needed. As you can see in the table, we got no results for a Duty cycle smaller than 6, which means that the motor only starts to turn over this this. It is possible to receive the electrical frequency from the oscilloscope by counting the oscillating period. The motor has 12 poles, which corresponds to 6 poles pairs. If we divide the electrical frequency by the number of the pole pairs we get the mechanical frequency and further if we multiply it with 2*pi we have the rotational frequency . We also calculated the rounds per minute to compare it to the data of the optical rpm measuring instrument which was provided by the MCI. The result of the measurement is the mass provided by the scale. The Trust force can be calculated with the gravitational acceleration. Hence we get Now the rotational speed and the Trust force are provided by the measurement setup and hence it is possible to calculate the missing constant Ct with the formula The thrust force and the rotational speed we get from Table 2andTable4. Visualization of the test results: We can see that both diagrams have a nonlinear behavior, which corresponds to the real motor behavior. With this measured data it is possible to create a transfer function (behavior) of the motor and hence implement it in the further process like the control of the system. Experimetal Measurement of Variabel Sensor Fusion The sensor fusion is one of the most important and fundamental parts for a quadrocopter controller. The sensor fusion of the IMU gives you the orientation of the quadrocopter and so it is the feedback of your system. If this data is wrong your controller gets wrong information about the orientation cannot control your system in a correct way. Remote Control As first step the remote control has to be assigned with the receiver to make sure that the receiver does not uses information from some other remote control. The receiver and the µ-controller communicate via a UART. The remote control has different channels, not all of them are used for the quadcopter. The remote control sends the information in form of bytes, therefore a protocol is used. Sender and receiver have to know the protocol that a communication is possible. The protocol is using 16 bytes, each information like pitch, roll, yaw and trust are two bytes large. In the software a buffer is used where the first byte is stored then the buffer is shifted one byte to the left. Then the next value from the protocol is added to the shifted value in the buffer. All channels have an offset, but the value couldn’t be found, therefore this had to be done by experiment. Fragmentation into different parts The main part of the block diagram is the µ-controller XMC on the board. On part of the input of the µ-controller is the data from the sensor fusion which includes data from the IMU and the GPS modulus. The GPS is add on of the project and not realized in the first step. The interface between the µ-controller and IMU is I²C. In addition the data which is send from the remote control is received from the receiver is also an input of the µ-controller. The µ-controller software includes the flight control which is based on the kinematic model of the quadcopter. The output is the PWM signal for the ESC of the BLDC, this part exists for all 4 BLDC`s. Test flights To do the first test flights a laboratory setup was built where the quadcopter was mounted. So test around one axis could be done. The laboratory setup was built with plastic tubes, they were elastic therefore some troubles due to oscillation occurred, so a second laboratory setup was built with a broomstick to test the controller parameters around one axis. Finally a free flight test was done. Results and Future Prospective After the calibration of the IMU (inertial measurement sensor) with laboratory test fight set up a free flight for the demonstration of the sensors was done. It resulted in a strange flight where we were not able to control the quadcopter anymore, because the IMU had some troubles with noisy angles at high rotating motors. After many test flights an attempt with a FIR filter was done but unfortunately without additionally success. The problems are still the wrong a values for the actual angles. For future projects it is necessary to get at first a stable controller which can maybe be done with an improve of the Kalman filter (kalman filter coefficients). Another possibility can be an improve of the existing kinematic model of the real system. Afterwards it would be possible to create the quadcopter for the autonomous fly. Up to now the mechanical set up of the quadcopter works really well, as well as the connection between flight device and remoter. The only problem still exists in the IMU implementation and calculation of the angles. Latest activity Category:BrowseCategory:Introduction